# Contributor: Alexey Yerin <yyp@disroot.org>
# Maintainer: Alexey Yerin <yyp@disroot.org>
pkgname=opustags
pkgver=1.6.0
pkgrel=0
pkgdesc="Ogg Opus tags editor"
url="https://github.com/fmang/opustags"
arch="all"
license="BSD-3-Clause"
makedepends="cmake libogg-dev"
subpackages="$pkgname-doc"
source="
	$pkgname-$pkgver.tar.gz::https://github.com/fmang/opustags/archive/refs/tags/$pkgver.tar.gz
"
options="!check" # Contains no tests

build() {
	if [ "$CBUILD" != "$CHOST" ]; then
		CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
	fi
	cmake -B build \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DBUILD_SHARED_LIBS=True \
		-DCMAKE_BUILD_TYPE=None \
		$CMAKE_CROSSOPTS .
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
aec5b28d533291ba3b85e4a42a4b5f95a8071214d8a4142cfcc8acd81495ef0abab21b0a52baf702b4d1525e60425b7925dd68ba23fa2d1644c06e6da87e0e0c  opustags-1.6.0.tar.gz
"
